<?php

use yii\helpers\Html;


/* @var $this yii\web\View */
/* @var $model backend\modules\pooai\models\ZpooaiGallImages */

$this->title = Yii::t('app', '创建页面图片');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Zpooai Gall Images'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->registerCssFile('@web/css/admin.css');
$this->registerCssFile('@web/css/jquery.dad.css');
$this->registerJsFile('@web/js/jquery.dad.min.js');
?>
<style>
    .page-data-form{
        overflow: hidden !important;
    }
</style>
<div class="zpooai-gall-images-create">
    <div class="zpooai-pages-create" style="background-color: white;width: 100%;height: 100%;">
        <div class="zpooai-pages-form" >
            <div class="nav-ul-li">
                <ul class="nav-ul">
                    <li class="nav-li nav-li-active" style="margin-left:0px !important;">
                        <a id="aPage01" data-toggle="tab"><i class="glyphicon glyphicon-th-large"></i>图片上传</a>
                    </li>
                    <li class="nav-li nav-li" style="margin-left:0px !important;">
                        <a id="aPage02" data-toggle="tab"><i class="glyphicon glyphicon-th-large"></i>图片排序</a>
                    </li>
                </ul>
            </div>

            <div class="page-data-form" >
                <?= $this->render('_form', [
                    'model' => $model,
                    'zpooaiPages'=>$zpooaiPages
                ]) ?>
            </div>
        </div>
    </div>

</div>

<script>
    $('.nav-li').mouseover(function(){
        $(this).css('background-color','rgb(250,250,250)')
    });
    $('.nav-li').mouseout(function(){
        $(this).css('background-color','rgb(245,245,245)')
    });
    $('.nav-li').click(function(){
        $('.nav-li').removeClass('nav-li-active');
        $(this).addClass('nav-li-active');

        var pageNumber = $(this).children()[0].id;
        if(pageNumber=='aPage01') {
            $('.FormPage02').css("display","none");
            $('.FormPage01').css("display","block");
        }  else if(pageNumber=="aPage02"){
            $('.FormPage02').css("display","block");
            $('.FormPage01').css("display","none");
        }
    });
</script>